package com.headingdata.parameter;

public class MethodTest2 {

    public static void main(String[] args) {
        //对比两个数组是否完全相等
        int[] arr1 = {12,15,18};
        int[] arr2 = {12,15,18};
        Boolean res = compareArray(arr1,arr2);
        System.out.println(res);
    }

    public  static Boolean compareArray(int[] arr1,int[] arr2){
        if (arr1 == null && arr2 == null){
            System.out.println("1111111111");
            return true;
        }
        if (arr1 == null || arr2 == null){
            System.out.println("222222222");
            return false;
        }
        if (arr1.length != arr2.length){
            System.out.println("333333333");
            return  false;
        }
        for (int i = 0; i < arr1.length; i++){
            if(arr1[i] != arr2[i]){
                System.out.println("6666666666");
                return false;
            }
        }
        System.out.println("888888888888");
        return  true;
    }
}
